import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'


import { registerMicroApps, start } from 'qiankun';
import microApps from './micro-app';

Vue.config.productionTip = false

new Vue({
  router,
  store,
  mounted: () => {
    // mounted后再注册子应用

  },
  render: function (h) { return h(App) }
}).$mount('#baseApp')


  // registerMicroApps();

  registerMicroApps(microApps, {
    beforeLoad: app => {
      console.log('beforeLoad before load app.name====>>>>>', app.name)
    },
    beforeMount: [
      app => {
        console.log('beforeMount [LifeCycle] before mount %c%s', 'color: green;', app.name);
      },
    ],
    afterMount: [
      app => {
        console.log('afterMount [LifeCycle] after mount %c%s', 'color: green;', app.name);
      }
    ],
    afterUnmount: [
      app => {
        console.log(' afterUnmount [LifeCycle] after unmount %c%s', 'color: green;', app.name);
      },
    ],
  });

  start();
